function debounce(fn,delay){
  let timeout = null;
  return function(){
    clearTimeout(timeout)
    timeout = setTimeout(fn,1000)
  }
}

module.exports = debounce